from django.conf.urls import url
from shop import views

urlpatterns = [
    # 获取 openid
    url(r'^get_openid$', views.WXLoginAPIView.as_view(), name='get_openid'),
    # 用户注册
    url(r'^register$', views.RegisterAPIView.as_view(), name='register'),
    # 用户登录
    url(r'^login$', views.LoginAPIView.as_view(), name='login'),
    # 分店名称
    url(r'^shops$', views.Shop.as_view(), name='shops'),
    # 分店进货
    url(r'^shop_purchase$', views.AddPurchaseAPIView.as_view(), name='shop_purchase'),
    # 分店销售
    url(r'^shop_sale$', views.AddSaleAPIView.as_view(), name='shop_sale'),
    # 分店支出
    url(r'^shop_expense$', views.AddCostAPIView.as_view(), name='shop_expense'),
    # 库房进货
    url(r'^storge_purchase$', views.StorageRoomPurchaseAPIView.as_view(), name='storage_purchase'),
    # 获取库存
    url(r'^get_rest$', views.ShopChangeAPIView.as_view(), name='get_rest'),
    # 销售情况查询
    url(r'^search/sale$', views.SearchSaleAPIView.as_view(), name='search_sale'),
    # 支出查询
    url(r'^search/cost$', views.SearchCostAPIView.as_view(), name='search_cost'),
    # 用户查询
    url(r'^search/user$', views.SearchClerkAPIView.as_view(), name='search_user'),
    # 添加进货
    url(r'^add/purchase$', views.AddPurchaseAPIView.as_view(), name='add_purchase'),
    # 添加销售
    url(r'^add/sale$', views.AddSaleAPIView.as_view(), name='add_sale'),
    # 获取支出类型
    url(r'^cost_type', views.CostType.as_view(), name='cost_type'),
    # 添加支出
    url(r'^add/cost$', views.AddCostAPIView.as_view(), name='add_cost'),
    # 添加入库
    url(r'^manage/purchase$', views.StorageRoomPurchaseAPIView.as_view(), name='manage_pruchase'),
    # 处理用户请求
    url(r'^manage/user$', views.OperateUserAPIView.as_view(), name='manage_user'),
    # 修改库房库存
    url(r'^manage/storage_room$', views.ModifyStorageRoom.as_view(), name='modify_storage'),
    # 分店管理
    url(r'^manage/shop$', views.ShopManage.as_view(), name='manage_shop'),
    # 获取调货店长openid
    url(r'^owner_openid$', views.GetOwnerOpenId.as_view(), name='get_owner_openid'),
    # 发送调货请求卡片
    url(r'^add/apply_transfer$', views.SendTransferCard.as_view(), name='apply_transfer'),
    # 处理调货请求
    url(r'^manage/transfer$', views.HandleTransfer.as_view(), name='handle_transfer'),
    # 调货查询
    url(r'^search/transfer$', views.SearchTransferAPIView.as_view(), name='search_transfer'),
]
